#!/usr/bin/python
from grades.models import Cycle, Grade, Period

for pname in ["Manhã", "Tarde"]:
	p = Period()
	p.name = pname
	p.save()

for i in [1, 2, 3, 4]:
	cycle = Cycle()
	cycle.number = i
	cycle.save()

for i in [1, 2, 3, 4, 5, 6, 7, 8, 9]:
	grade = Grade()
	grade.number = i
	if (i <= 3) :
		grade.cycle = Cycle.objects.get(number=1)
	elif i <= 5 :
		grade.cycle = Cycle.objects.get(number=2)
	elif i <= 7 :
		grade.cycle = Cycle.objects.get(number=3)
	else :
		grade.cycle = Cycle.objects.get(number=4)
	grade.save()

